<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" type="text/css" href="js/ext/resources/css/ext-all.css"/>
	<link rel="stylesheet" type="text/css" href="js/ext/resources/css/ext-patch.css"/>
	<script type="text/javascript" src="js/ext/adapter/ext/ext-base.js"></script>
	<script type="text/javascript" src="js/ext/ext-all.js"></script>
	<script type="text/javascript" src="js/rating/customerRating_FirstPDController.js"></script> 
	<link rel="stylesheet" type="text/css" href="css/left_tabmenu.css">
	<link rel="stylesheet" type="text/css" href="css/public.css">
	<link rel="stylesheet" type="text/css" href="css/rating_report.css"/>
	
	<script type="text/javascript" src="js/showmenu.js"></script>
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

<script type="text/javascript">
function getBlock(ck,d)
  {
   var c = document.getElementById(ck);
   var d = document.getElementById(d);
   if(c.checked==true){
   d.style.display = "block";
   }
   else{
    d.style.display = "none";
    }
  }
</script>

<script language="javascript"> 
function printsetup(){ 
// 打印页面设置 
wb.execwb(8,1); 
} 
function printpreview(){ 
// 打印页面预览 

wb.execwb(7,1); 

} 

function printit() 
{ 
if (confirm('确定打印吗？')){ 
wb.execwb(6,6);
} 
} 
</script> 

  </head>

  <body class="body_bg"> 
<center>
 <table id="rating_report">

 <tr><th ><div id="header_bg"></div><span id="title">非零售客户评级报告</span></th></tr>
 

 <tr><td>
 <table id="table_report_general">
 <tr><td><p class="item_name2">报告编号：</p><p class="item_value2">${reportPD.serialNo} </p></td></tr>
 <tr><td><p class="item_name2">客户名称：</p><p class="item_value2">${reportCustInfo.custName}</p></td></tr>
 <tr><td><p class="item_name2">客户号：</p><p class="item_value2">${reportCustInfo.custNo}</p></td></tr>
 <tr><td><p class="item_name2">行业分类: </p><p class="item_value2">${DataDictionary['IndustryType'][reportCustInfo.industryType].itemName}</p></td></tr>
 </table>
 </td></tr>
 <tr><td>
	 <table id="table_cust_general" class="sub_table">
		 <tr><th class="subtitle">客户基本信息</th></tr>
		 <tr><td>
			 <table id="table_cust_general_info" class="sub_table_info">
			 	<tr><td><span class="item_name">客户号：</span><span class="item_value">${reportCustInfo.custNo}</span></td><td><span class="item_name">客户名称：</span><span class="item_value">${reportCustInfo.custName}</span></td><td><span class="item_name">客户类型：</span><span class="item_value">${DataDictionary['CustType'][reportCustInfo.custType].itemName}</span></td></tr>
				 <tr><td><span  class="item_name">所有制类别：</span><span class="item_value">${DataDictionary['BelongType'][reportCustInfo.belongType].itemName}</span></td><td ><span class="item_name">成立时间：</span><span class="item_value">${reportCustInfo.establishDate}</span></td><td><span class="item_name">所在国家地区：</span><span class="item_value">${DataDictionary['CountryCode'][reportCustInfo.countryCode].itemName}</span></td></tr>
				 <tr><td colspan="4" ><span class="item_name">主营业务：</span><span class="item_value1">${reportCustInfo.busiScope}</span></td></tr>
				 <tr><td><span class="item_name">首次建立信贷关系时间：</span><span class="item_value">${reportCustInfo.relationshipDate}</span></td><td><span class="item_name">是否上市公司:</span><span class="item_value">${DataDictionary['YesNo'][reportCustInfo.publicFlag].itemName}</span></td><td><span class="item_name">是否集团客户：</span><span class="item_value">${DataDictionary['GroupClient'][reportCustInfo.groupFlag].itemName}</span></td></tr>
				 <tr><td><span class="item_name">资产总额(元)：</span><span class="item_value">${reportCustInfo.assetSumString}</span></td><td><span class="item_name">经办人：</span><span class="item_value">${reportCustInfo.inputUserName}</span></td><td><span class="item_name"></span><span class="item_value"></span></td></tr>
			 </table>
		</td></tr>
	 </table>
 </td></tr>
 <tr><td>
	 <table id="table_cust_pd" class="sub_table">
	 <tr><th class="subtitle">评级结果</th></tr>
	 <tr><td>
		 <table >
		 <tr><td class="subtitle_sub"><span>客户信用评级信息</span></td></tr>
		 <tr><td >
		 	<table id="table_cust_pd_info" class="sub_table_info">
			 	<tr><td><span class="item_name">最新评级结果：</span><span class="item_value">${reportPD.confirmPdlevel}</span></td><td><span class="item_name">最新评级PD：</span><span class="item_value">${reportPD.confirmPdvalue}</span></td><td><span class="item_name">最新评级模型：</span><span class="item_value">${reportPD.modelName}</span></td></tr>
				<tr><td><span class="item_name">最新评级到期日：</span><span class="item_value">${reportPD.endDate}</span></td><td><span class="item_name">最新评级发起机构：</span><span class="item_value">${reportPD.firstOrgId }</span></td><td><span class="item_name">最新评级发起人：</span><span class="item_value">${reportPD.firstUserId }</span></td></tr>
				<tr><td><span class="item_name">风险暴露分类：</span><span class="item_value">${reportCustInfo.exposureType }</span></td><td><span class="item_name">最新评级财务报表期次：</span><span class="item_value">${reportPD.reportDate }</span></td><td><span class="item_name">最新评级认定时间：</span><span class="item_value">${reportPD.confirmDate}</span></td></tr>
				<tr><td><span class="item_name">风险限额(元)：</span><span class="item_value">${reportCustLimit.finalLimitString }</span></td><td><span class="item_name"></span><span class="item_value"></span></td><td><span class="item_name"></span><span class="item_value"></span></td></tr>
		 	</table>	
		 </td></tr>
		 <tr><td>
		 	<table >
		 	<tr><td class="subtitle_sub1"><span>-定量因素</span></td></tr>
		 	<tr><td >
		 	<c:choose>
		 		<c:when test ="${isSpecial == 0}">
		 			<table id="table_cust_pd_info_1" class="sub_table_info">
				 		<c:forEach var="a" items="${reportRatioList}" varStatus="status">
				 			<c:if test="${status.count%4==0}">
				 			<tr>
				 			</c:if>
				 			<td><span class="item_name">${ReportItem[a.id.reportItemNo]}: </span><span class="item_value">${a.reportItemValueString}</span></td>
				 			<c:if test="${status.count%3==0}">
				 			</tr>
				 			</c:if>			
				 		</c:forEach>
		 			</table>
		 		</c:when>
		 		<c:otherwise>
		 			<table id="table_cust_pd_info_2" class="sub_table_info">
		 				<c:forEach var="a" items="${reportRatioList}" varStatus="status">
		 					<tr><td width="15%"><span class="item_name">${a.describe}:</span><span class="item_value1">${a.itemDescription}</span></td></tr>
		 				</c:forEach>
		 			</table>
		 		</c:otherwise>
		 	</c:choose>
		 	</td></tr>
		 	</table>
		 	<table >
		 	<tr><td class="subtitle_sub1"><span>-定性因素</span></td></tr>
		 	<tr><td>
		 		<table id="table_cust_pd_info_2" class="sub_table_info">
		 		<c:forEach var="a" items="${reportQuaList}" varStatus="status">
		 		<tr><td width="15%"><span class="item_name">${a.describe}:</span><span class="item_value1">${a.itemDescription}</span></td></tr>
		 		</c:forEach>
		 		</table>
		 	</td></tr>
		 	</table>
		 </td></tr>
		 </table>
	 </td></tr>
	 
	 <tr>
	 <td>
	 <table id="table_cust_debt" class="sub_table">
	  <tr><td>
	  	<c:forEach items="${reportDebtMap}" var="rdm" varStatus="states">  
		 <table >
		 <tr><td class="subtitle_sub"><span>债项评级信息</span></td></tr>
		 <tr><td >
		 	<table id="table_cust_debt_info_" class="sub_table_info">
			 	<tr><td><span class="item_name">债项名称：</span><span class="item_value">${rdm.key.debtDesc}</span></td><td><span class="item_name">债项编号：</span><span class="item_value">${rdm.key.debtId}</span></td><td><span class="item_name">贷款额度：</span><span class="item_value">${rdm.key.debtSum}</span></td></tr>
				<tr><td><span class="item_name">债项品种：</span><span class="item_value">${DataDictionary['DebtType'][rdm.key.debtType].itemName}</span></td><td><span class="item_name">到期日：</span><span class="item_value">${rdm.key.endDate}</span></td><td><span class="item_name">债项余额：</span><span class="item_value">${rdm.key.debtBalance}</span></td></tr>
				<tr><td><span class="item_name">违约损失率LGD(%)：</span><span class="item_value">${rdm.key.lgd * 100}</span></td></tr>
			</table>	
		 </td></tr>
		 <tr><td >
		 	<table>
		 	<tr><td class="subtitle_sub1"><span>-质押品信息</span></td></tr>
		 	<tr><td>
		 		<table id="table_cust_debtCollateral_info_" class="sub_table_info">
		 			 <tr><!--<td><span class="item_name3">质押品编号</span></td>--><td><span class="item_name3">抵质押品类型</span></td><td><span class="item_name3">抵质押品名称</span></td><td><span class="item_name3">放款时评级估值</span></td></tr>
		 			 <c:forEach items="${rdm.value}" var="a" varStatus="menuStates">  
              	  	 <tr><!--<td><font size="2">${a.collateralId}</font></td>-->
              	  	 <td><font size="2">${DataDictionary['GuarantyType'][a.collateralType].itemName}</font></td>
              	  	 <td><font size="2">${a.collateralName}</font></td>
              	  	 <td><font size="2">${a.loanValue}</font></td></tr>  	 
         		  	 </c:forEach>  
		 		</table>
		 	</td></tr>
		 	</table> 	
		 </td></tr>
		 </table>
		 
		 
		 
		 
		 </c:forEach>  
		 
	 </td></tr>
	 </table>
	 </td>
	 </tr>
	  
	 <tr>
	 <td>
	 <table id="table_cust_hisPd" class="sub_table">
		 	 <tr><td>
		 	 <c:forEach var="a" items="${reportPDList}" varStatus="status">
				<table >
				 <tr><td class="subtitle_sub"><span>历史评级信息</span></td></tr>
				 <tr><td >
				 		<table >
				 		<tr><td><span class="item_name">客户初始评级：</span><span class="item_value">${a.confirmPdlevel}</span></td><td><span class="item_name">评级对应PD：</span><span class="item_value">${a.confirmPdvalue}</span></td><td><span class="item_name">评级模型：</span><span class="item_value">${a.modelName}</span></td></tr>
					 	 <tr><td><span class="item_name">评级到期日：</span><span class="item_value">${a.endDate}</span></td><td><span class="item_name">评级发起机构：</span><span class="item_value">${a.firstOrgId }</span></td><td><span class="item_name">评级认定时间：</span><span class="item_value">${a.confirmDate}</span></td></tr>
				 	</table>
				 </td></tr>
				 </table>
		 	<br/>	
		 	</c:forEach>
		 </td></tr>
	 </table>
	 </td>
	 </tr>
	 </table>
 </td>
 </tr>
 <tr>
 <td>
 <table id="table_report_info" class="sub_table">
 <tr><th class="subtitle">评级报告信息</th></tr>
 <tr><td>
	 <table >
	 	<tr><td><span class="item_name">评级报告生成时间：</span><span class="item_value">${reportDate}</span></td><td><span class="item_name">评级发起人：</span><span class="item_value">${reportPD.firstUserId }</span></td><td><span class="item_name">评级报告版本编号：</span><span class="item_value">${reportPD.serialNo}</span></td></tr>
	 </table>
 </td></tr>
 </table>
 </td>
 </tr>
  <tr>
 <td>
 <table  id="table_report_comments" class="sub_table">
 <tr><th class="subtitle">关于评级结果的说明</th></tr>
 <tr><td><span class="item_name2">是否需要调整最新评级结果？</span><span class="item_value3"> <input type="checkbox" id="chk_yes"  onclick="getBlock('chk_yes','div_hidden')"/>&nbsp是&nbsp&nbsp;<input type="checkbox"/>&nbsp否</span>
 </td></tr>
 <tr><td>
 <div id="div_hidden" style="display:none;">
 <table >
 <tr><td><p class="item_name2">建议调整至:</p><p class="item_value2">&nbsp&nbsp</p><p class="item_name2">级别:</p><p class="item_name2">建议人：</p></td></tr>
 <tr><td><p class="item_name2" >评级结果（或调整评级结果）的说明：</p></td></tr>
  	<tr><td colspan="3">
	 	<textarea rows="8" cols="100" style="resize: none;">
		</textarea>
	</td></tr>
 </table>
 </div>
 </td></tr>
 </table>
 </td>
 </tr>
  <tr>
 <td>
  <table id="table_report_suggest" class="sub_table" >
 <tr><th class="subtitle">审批意见</th></tr>
 <tr><td>
 	<table>
 	<tr><td><p class="item_name2">审批人：</p><p class="item_value2">&nbsp</p><p class="item_name2">审批人所在部门：</p><p class="item_value2">&nbsp</p><p class="item_value2">&nbsp</p><p class="item_value2">&nbsp</p><p class="item_name2">权限等级：</p><p class="item_value2">&nbsp</p></td></tr>
 	<tr><td colspan="3">
	 	<textarea rows="8" cols="100" style="resize: none;">
		</textarea>
	</td></tr>
 	</table>
 </td></tr>
 </table>
 </td>
 </tr>
 <tr><td>
	<table  id="table_report_approve" class="sub_table">
 	<tr><th class="subtitle">审批结果</th></tr>
 	<tr><td  colspan="3">
	 	<textarea rows="8" cols="100" style="resize: none;">
		</textarea>
	</td></tr>
 	</table>
 </td></tr>
 <tr><th ><span id="tail">广东清远农村商业银行股份有限公司</span><div id="tail_bg"></div></th></tr>
 </table>
 
<table id="table_button">
<tr>
 <td>
</td></tr>
</table>
 </center> </body>
</html>
